package com.mybed.crm.service;

import com.mybed.crm.pojo.dto.*;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mybed.crm.pojo.pojo.Business;
import com.mybed.crm.pojo.pojo.BusinessRecord;
import com.mybed.crm.pojo.vo.BusinessRecordVo;
import com.mybed.crm.result.PageResult;

import java.util.List;

//商机管理
public interface BusinessService extends IService<Business> {

    /**
     * 分页查询
     * @param pageBusinessDto
     * @return
     */
    PageResult pageBusinessQuery(PageBusinessDto pageBusinessDto);

    /**
     * 公海池的分页查询
     * @param pageBusinessDto
     * @return
     */
    PageResult pageBusinessSeaQuery(PageBusinessDto pageBusinessDto);

    /**
     * 新增商机
     * @param businessDto
     */
    void addBusiness(BusinessDto businessDto);

    /**
     * 根据Id查询商机
     * @param id
     */
    Business selectBusinessId(Long id);

    /**
     * 跟进更改商机数据
     * @param businessRecordDto
     */
    void addRecord(BusinessRecordDto businessRecordDto);

    /**
     * 查询跟进商机的结果
     * @param businessId
     */
    List<BusinessRecordVo> selectRecord(Long businessId);

    /**
     * 踢回公海
     * @param id
     * @param backReason
     * @return
     */
    void updateBusinessStatus(Integer id, Integer backReason);

    /**
     * 商机分配
     * @param assignmentDto
     */
    void updateBusinessUserId(AssignmentDto assignmentDto);

    /**
     * 捞出公海
     * @param gainDto
     */
    void gainCluesPool(GainDto gainDto);

}
